package mode.adapter.objectadapter;

/**
 * 适配器
 *
 * @author xjx
 * @date 2023/7/20 15:06
 */
public class PowerAdapter implements DC5 {

    private Power power;

    PowerAdapter(Power power) {
        this.power = power;
    }

    @Override
    public int output5() {
        int output220 = power.output();
        int output5 = 5;
        System.out.println(output220 + "V适配转换成" + output5 + "V");
        return output5;
    }
}
